<?php
date_default_timezone_set('Asia/Shanghai'); 
class Common
{
    public $mysql;
    public function __construct(){
        $this->mysql = new \DBPDO();       
    }
    public function getTracknumbers(){
    	$row = $this->mysql->where("posttracknumber_status=0")->select('dlz_order_info');
    	return $row;
    }


    public function byStoreIdgetStoreInfo($shopid=null){
    	$storename = $this->mysql->where("thirdname='$shopid'")->select('dlz_account_info',$type='single');
    	return $storename;
    }
    public function byOiderIGetBuyerinfo($orderid=null){
        $buyerinfo = $this->mysql->where("increment_id='$orderid'")->select('dlz_shipping_info',$type='single');
        return $buyerinfo;
    }

    public function byOrderidGetOrderInfo($orderid=null){
        $orderidinfo = $this->mysql->where("increment_id='$orderid'")->select('dlz_attribute_all_id');
        return $orderidinfo;
    }

    public function byOrderidUpdate($orderid=null,$data=''){
        $row = $this->mysql->where("increment_id='$orderid'")->update('dlz_order_info',$arrData=$data);
        return $row;
    }

    public function InsertINfo($data=''){
        $row = $this->mysql->insert('dlz_post_tracnumber_record',$arrData=$data);
        return $row;
    }

    public function getorderid(){
        $row = $this->mysql->where("isfromQmget=0")->select('dlz_order_info');
        return $row;        
    }
}